/**
 * 依据权限数字计算用户所具有的全部权限
 */
package com.pms.utils;

public class CalPermNo {
	private static CalPermNo cpn;
	private CalPermNo(){

	}
	public static CalPermNo getInstance(){
		if(cpn==null){
			cpn=new CalPermNo();
		}
		return cpn;
	}
	public String[] calPerm(int source){
		String[] perms=new String[3];
		if(source%2==1){
			perms[0]="checked";
		}else{
			perms[0]="";
		}
		if(source==2||source==3||source==6||source==7){
			perms[1]="checked";
		}else{
			perms[1]="";
		}
		
		if(source>=4){
			perms[2]="checked";
		}else{
			perms[2]="";
		}
		return perms;
	}
}
